import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const state = {
    count:1,
    userHeadPic:"",
    userNickName:"",
    userSex:1,
    phoneNumber: ""
}
const mutations = {
    add(state){
        state.count += 1;
    },
    reduce(state){
        state.count -= 1;
    },
    setHeadPic(state, picUrl) {
      state.userHeadPic = picUrl;
    },
    setNickName(state, nickName){
      state.userNickName = nickName;
    },
    setSex(state, sex){
      state.userSex = sex;
    },
    setPhoneNumber(state, phone){
      state.phoneNumber = phone;
    }
}

export default new Vuex.Store({
    state,
    mutations:mutations
});
